package com.yylending.las.common;

import android.text.TextUtils;
import com.google.gson.Gson;
import com.yyfax.common.CLog;
import com.yyfax.infrastructure.secure.RSA;
import com.yylending.las.Global;

/**
 * Created by laixj on 2017/5/27.
 * Copyright ©2017 www.yylending.com. All Rights Reserved.
 */

public class RSAEntity {

	public String json_r;

	public RSAEntity(Object param) {
		String jsonString = new Gson().toJson(param);
		CLog.i("LogInterceptor", "rsa jsonString-->" + jsonString);
		CLog.i("LogInterceptor", "rsa Global.KEY_RSA-->" + Global.KEY_RSA);
		if(!TextUtils.isEmpty(Global.KEY_RSA)){
			json_r = RSA.encryptByPublicKey(jsonString, Global.KEY_RSA);
			CLog.i("LogInterceptor", "rsa json_r-->" + json_r);
		}
	}
}